﻿using System;
using System.Collections.Generic;
using Behaving.Composites;

namespace Behaving.Decorators
{
    public abstract class Decorator : Behaviour, IHasChildren
    {
        protected Decorator(Behaviour behaviour)
        {
            Behaviour = behaviour;
        }

        public Behaviour Behaviour { get; set; }      

        public IEnumerable<Behaviour> GetChildren()
        {
            yield return Behaviour;
        }
    }
}